Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[risk=low][no ticket] Let Spring handle its own dependencies (and partially upgrade) #9049

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jmthibault79
Copy link
Collaborator

@jmthibault79 jmthibault79 commented Jan 15, 2025

Use the Spring dependency management plugin instead of hardcoding. This allows us to stop hard-coding version numbers in many locations.

Also upgrade Spring, Spring-Boot, and Spring-Security to the latest 6.1.x, 3.3.x, and 6.3.x respectively. A full upgrade would be to 6.2, 3.4, and 6.4, but this would be nontrivial.

Tested locally by running Local UI and API.


PR checklist

  • I have included an issue ID or "no ticket" in the PR title as outlined in CONTRIBUTING.md.
  • I have included a risk tag of the form [risk=no|low|moderate|severe] in the PR title as outlined in CONTRIBUTING.md.
  • I have manually tested this change and my testing process is described above.
  • This change includes appropriate automated tests, and I have documented any behavior that cannot be tested with code.
  • I have added explanatory comments where the logic is not obvious.
  • One or more of the following is true:
    • This change is intended to complete a JIRA story, so I have checked that all AC are met for that story.
    • This change fixes a bug, so I have ensured the steps to reproduce are in the Jira ticket or provided above.
    • This change impacts deployment safety (e.g. removing/altering APIs which are in use), so I have documented the impacts in the description.
    • This change includes a new feature flag, so I have created and linked new JIRA tickets to (a) turn on the feature flag and (b) remove it later.
    • This change modifies the UI, so I have taken screenshots or recordings of the new behavior and notified the PO and UX designer in Slack.
    • This change modifies API behavior, so I have run the relevant E2E tests locally because API changes are not covered by our PR checks.
    • None of the above apply to this change.

// 1.5.7+ results in a runtime error:
// Logging system failed to initialize using configuration from 'null'
// java.lang.NoSuchMethodError: 'java.lang.Object ch.qos.logback.classic.LoggerContext.getConfigurationLock()'
LOGBACK_VERSION = '1.5.6'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Spring plugin pulls in a compatible logback automatically. This PR brings it to 1.5.12.

@@ -53,7 +49,9 @@ plugins {
id 'java'
id 'war'

id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'io.spring.dependency-management' version '1.1.7'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest

@@ -435,7 +466,6 @@ dependencies {
// 5.4+ results in a runtime error:
// java.lang.NoSuchMethodError: 'void org.apache.hc.core5.http.impl.io.DefaultHttpRequestWriterFactory.<init>(org.apache.hc.core5.http.config.Http1Config)'
implementation "org.apache.httpcomponents.client5:httpclient5:5.3.1"
implementation "org.springframework.boot:spring-boot-starter-validation:$project.ext.SPRING_BOOT_VERSION"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For most of the Spring dependencies:

  • moved them up in the file
  • grouped with other Spring packages
  • removed version numbers
  • removed exclusions (no longer needed)

@jmthibault79 jmthibault79 marked this pull request as ready for review January 15, 2025 21:36
@jmthibault79
Copy link
Collaborator Author

Not sure why tests are failing in Circle. They passed for me locally.

I was able to upgrade these packages manually anyway: #9051

@jmthibault79 jmthibault79 marked this pull request as draft January 16, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant